//
//  WCNPastPatientTCell.m
//  WCN
//
//  Created by 杨鑫 on 15/6/2.
//  Copyright (c) 2015年 ShanghaiCize Trade And Business Co., Ltd. All rights reserved.
//

#import "WCNPastPatientTCell.h"

@implementation WCNPastPatientTCell

- (void)awakeFromNib {
    // Initialization code
    [self setSeparatorInset:UIEdgeInsetsZero];
    if ([self respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)]) {
        [self setPreservesSuperviewLayoutMargins:NO];
    }
    if ([self respondsToSelector:@selector(setLayoutMargins:)]) {
        [self setLayoutMargins:UIEdgeInsetsZero];
    }
}
- (void)setModel:(Patient *)model{
    _model = model;
    
    
        if ([model.nursingLevel isEqualToString:@"特级"]) {
            self.level.textColor = HexRGB(0xea1311);
            self.level.text = @"特级";
        } else if ([model.nursingLevel isEqualToString:@"一级"]) {
            self.level.textColor = HexRGB(0xff34b3);
            self.level.text = @"一级";
        } else if ([model.nursingLevel isEqualToString:@"二级"]) {
            self.level.textColor = HexRGB(0x00abf1);
            self.level.text = @"二级";
        } else if ([model.nursingLevel isEqualToString:@"三级"]) {
            self.level.textColor = HexRGB(0x00baa0);
            self.level.text = @"三级";
        }
        self.name.text = model.name;
        self.part.text = model.woundDesc;
//        self.status.text = model.nursingStatusName;
    if ([model.nursingStatus isEqualToString:@"MONITORING"]) {
        self.status.text = @"检测中";
    }else if ([model.nursingStatus isEqualToString:@"NURSING"]) {
        self.status.text = @"护理中";
    }else if ([model.nursingStatus isEqualToString:@"DISCHARGED"]) {
        self.status.text = @"已出院";
    }else if ([model.nursingStatus isEqualToString:@"DEPT_TRANSFERRED"]) {
        self.status.text = @"转科室";
    }else if ([model.nursingStatus isEqualToString:@"HOSPITAL_TRANSFERRED"]) {
        self.status.text = @"转院";
    }else if ([model.nursingStatus isEqualToString:@"DEAD"]) {
        self.status.text = @"死亡";
    }

    
}

@end
